// 跳转页面
function goPage(url: string): void {
	uni.navigateTo({ url });
};

// 关闭当前页面，跳转到应用内的某个页面
function redirectPage(url: string): void {
	uni.redirectTo({ url });
};

// 返回上一页
function goBack(): void {
	uni.navigateBack();
};

// 到tabbar页
function switchTab(url: string): void {
	uni.switchTab({ url });
}

// 复制到粘贴板
function onCopy(data: string): void {
	uni.setClipboardData({ data });
};

// 扫码二维码
const scanCode = (): void => {
	uni.scanCode();
};
	
export {
	goPage,
	redirectPage,
	goBack,
	switchTab,
	onCopy,
	scanCode,
}